#include "JamnikPart.h"

JamnikPart::JamnikPart(const QPixmap &pix, QPoint xy, JamnikPart::Directions direction) {
	partWidth = 20;
	this->pix = pix;
	this->xy = QPoint(xy.x()*partWidth, xy.y()*partWidth);//xy*QPoint(20,20);
	this->direction = direction;
}

QPixmap JamnikPart::getPart() {
	return pix;
}

void JamnikPart::setPart(const QPixmap &pix) {
	this->pix = pix;
}

QPoint JamnikPart::getXY() {
	return QPoint(xy.x()/partWidth, xy.y()/partWidth);//xy / QPoint(20,20);
}

QPoint JamnikPart::getRealXY() {
	return xy;
}

void JamnikPart::setXY(const QPoint xy) {
	this->xy = QPoint(xy.x()*partWidth, xy.y()*partWidth);
}

void JamnikPart::setDirection(JamnikPart::Directions direction){
	this->direction = direction;
}

JamnikPart::Directions JamnikPart::getDirection(){
	return direction;
}

JamnikPart::~JamnikPart() {
	// TODO Auto-generated destructor stub
}
